package com.whw.fy.service.impl;

import com.whw.fy.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.whw.fy.mapper.JurisdictionMapper;
import com.whw.fy.entity.Jurisdiction;
import com.whw.fy.service.JurisdictionService;
@Service
public class JurisdictionServiceImpl implements JurisdictionService{

    @Resource
    private JurisdictionMapper jurisdictionMapper;

    @Override
    public Message deleteByPrimaryKey(Integer jurisdictionId) {
        return jurisdictionMapper.deleteByPrimaryKey(jurisdictionId)>0? Message.success(null):Message.fail(null);
    }

    @Override
    public Message insert(Jurisdiction record) {
        return jurisdictionMapper.insert(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message insertSelective(Jurisdiction record) {
        return jurisdictionMapper.insertSelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer jurisdictionId) {
        return Message.success(null).add(jurisdictionMapper.selectByPrimaryKey(jurisdictionId));
    }

    @Override
    public Message updateByPrimaryKeySelective(Jurisdiction record) {
        return jurisdictionMapper.updateByPrimaryKeySelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message updateByPrimaryKey(Jurisdiction record) {
        return jurisdictionMapper.updateByPrimaryKey(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectALL() {
        return Message.success(null).add(jurisdictionMapper.selectAll());
    }

}
